package cate.game.event.master;

import cate.game.event.GameEventListener;
import cate.game.role.Role;
import cate.game.role.base.msg.RolePowerResp;

public class PowerChangeListener implements GameEventListener<PowerChangeEvent> {
    @Override
    public void onEvent(PowerChangeEvent gameEvent) {
        Role role = gameEvent.role;
        role.sendNow(new RolePowerResp(gameEvent.power));
        role.getGame().rank.power.record(role, gameEvent.power);
        role.getFarm().dailyFb.update();
        role.getHistory().action.fightPowerUp(gameEvent.power);
        role.getGame().trace.role.onPowerChange(role);
    }

    @Override
    public boolean isFailOnException() {
        return false;
    }
}
